@layout("/common/_container.html"){
<!--<div>跟进人页面</div>-->
<!--<label><input class="ipt" type="radio" value="asp" name="me" />asp</label>-->
<style>
    .pay_list_c1 {
        display: inline-block;
        width: 15px;
        height: 15px;
        background: #DCDCDC;
        border: 1px solid #535353;
        border-radius: 5px;
        vertical-align: middle
    }
    .radioclass {
        opacity: 0;
        cursor: pointer;
        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
        filter: alpha(opacity=0);
    }
    .chils{
        display: inline-block;
        width: 24%;
        margin: 8px 0;
    }
</style>

<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div id="tcBox" class="clearfix">

        </div>
        <div>
            <button class="btn" type="button" id="submission">提交</button>
        </div>
    </div>
</div>


<link rel="stylesheet" href="${ctxPath}/static/css/jqui/jquery-ui.min.css">
<script src="${ctxPath}/static/js/jquery-ui.min.js"></script>
<script src="${ctxPath}/static/modular/tcCenter/consultant/consultant_info.js"></script>
<script>
    //把数据渲染到archiving_content容器里面
    var dom = document.getElementsByClassName('content')[0];
    $.ajax({
        url: Feng.ctxPath + "/reservations/getArchiving",
        type: "get",
        success: function (data) {
            var listr = "";
            for(var i=0;i<data.length;i++){
                listr += '<div class="col-sm-3" style="padding: 0;"><span class="pay_list_c1 projectDatas"><input class="radioclass" type="radio" value="'+data[i].account+'" name="about" id="click_'+data[i].account+'"></span><label for="click_'+data[i].account+'" style="font-weight: 500;margin-left: 10px;">'+data[i].account+'</label></div>'
            }
            document.getElementById('tcBox').innerHTML = listr;
        },
        error: function (data) {
            alert('内部故障!');
        }
    });

    $("#tcBox").on('click', '.projectDatas', function () {
        $(this).parent().parent().find(".pay_list_c1").css("background", "#DCDCDC")
        $(this).css("background", "#289bd6")
    });
    $("#tcBox").on('click', '.projectData', function () {
        $(this).parent().parent().find(".pay_list_c1").css("background", "#DCDCDC")
        $(this).siblings().css("background", "#289bd6")
    });

    $("#submission").click(function () {
        var tcName = $("input[name='about']:checked").val();
        if(tcName == "" || tcName == null){
            window.parent.document.getElementById("follower").value = "";
        }else {
            window.parent.document.getElementById("follower").value=tcName;
        }

        var indexs = parent.layer.getFrameIndex(window.name);
        parent.layer.close(indexs)
    });



//    var radio = document.getElementsByClassName('ipt');
//    var submit = document.getElementById("submit");
//    var isChecked=0;
//    submit.onclick = function(){
//        var dom =parent.document.getElementById('follower');//访问父页面元素值
//        for(var i=0;i<radio.length;i++){
//            if(radio[i].checked){
//                isChecked++;
//                dom.value = radio[i].value;
//            }
//        }
//        if(isChecked==0){
//            dom.value ='';
//        }
//
//    }


//
//            var fragment = document.createDocumentFragment();
//            var ul = document.createElement("ul");
//            for(var i=0;i<data.length;i++){
//                listr += "<li class='chils'><label class='pay_list_c1'><input class='ipt radioclass' type='radio' value='"+data[i].account+"' name='me' />"+data[i].account+"</label></li>";
//            }
//            ul.innerHTML = listr;
//            fragment.appendChild(ul);
//            dom.appendChild(fragment);
</script>
@}
